/*
 * communication.h
 *
 *  Created on: 08.03.2011
 *      Author: nick
 */

#ifndef COMMUNICATION_H_
#define COMMUNICATION_H_

#include <p33Fxxxx.h>
#include <uart.h>
#include <stdlib.h>
#include "sensor_typedefs.h"
#include "hardware_settings.h"

#define BAUDRATE 38400
#define BRGVAL ((FCY/BAUDRATE)/16)-1
#define IDLE_LINE_TIMEOUT 10360

void initUart(void);

//! send Sensor Data valueMax/Min = [16384, -16383] if the val is bigger/smaller it gets cut off
void sendSensorData( ESensorAdr, ESensorValClass, int value, int alarm );

#endif /* COMMUNICATION_H_ */
